const express = require('express');
//路由函数逻辑
const userHandler = require('../router_handler/user');
//自动表单验证
const expressJoi = require("@escook/express-joi")

const router = express.Router();

//导入需要验证的规则对象
const {reg_login_schema} = require('../sechema/user')

//将验证验证规则对象 声明为局部中间件
router.post('/reguser',expressJoi(reg_login_schema),userHandler.reguser)

router.post("/login",expressJoi(reg_login_schema),userHandler.login)

module.exports = router;